package cn.silver.framework.jpa.param;

import cn.silver.framework.mybatis.constant.PageContant;
import cn.silver.framework.mybatis.param.BaseParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.io.Serializable;

/**
 * @author zhouxiaobo
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(name = "BusSearch", title = "业务对象查询条件")
public abstract class BusParam extends BaseParam implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;
    @Schema(title = "业务编码")
    private String code;
    @Schema(title = "业务名称")
    private String name;
    @Schema(title = "当前状态")
    private String status;

    @Schema(title = "序号")
    private Integer sort;

    @Override
    public String getOrderColumn() {
        return "sort";
    }

    @Override
    public String getOrderType() {
        return PageContant.ASC_SORT;
    }
}
